package com.fowo.api.model.logisticslevel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 物流等级 导入导出辅助模型 */
@Getter
@Setter
public class LogisticslevelExcelPo {

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属仓库")
  private String parentWarehouseName;

  @ExcelIgnore
  @ExcelProperty(value = "所属仓库")
  private Long parentWarehouse;

  @Size(max = 50, message = "名称长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "名称")
  private String name;

  @Size(max = 50, message = "编码长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "编码")
  private String code;

  @EnumsString(
    value = { "开启", "关闭" },
    message = "开启状态的可用值为 “开启”, “关闭” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "开启状态")
  private String isOpen;
}
